Skip to content

Document removing or replacing a shipped case mask - #1020

Merged
derek73 merged 1 commit into
masterfrom
docs/remove-case-mask
Nov 3, 2026
Merged

derek73 merged 1 commit into
masterfrom
docs/remove-case-mask

Conversation

@derek73

@derek73 derek73 commented Nov 3, 2026

Copy link
Copy Markdown
Owner

docs/customize.rst's "Fixing the case of a particular word" section showed how to add a case mask but not how to drop or replace a shipped one. This came up after #1016 shipped the Mac surname masks. Docs only; no behavior changes.

The new subsection, "Removing or replacing a shipped mask", says:

  • Which masks ship. Since 3.0, a name opening Mac is title-cased unless a mask records it (MacDonald is masked, Machado and Mackenzie are not), and Mc keeps its capital.
  • remove() does not drop a mask. A mask belongs to the word, not to one of its readings, so default.remove("macdonald", kind="family") still repairs RONALD MACDONALD to Ronald MacDonald. Filtering the pair out of capitalization_exceptions drops it (Ronald Macdonald).
  • Appending replaces. When two pairs share a key the later one wins, as _lexicon._normpairs documents, so appending ("phd", "PHD") replaces the shipped PhD mask without removing it first.

Each claim is a doctest. Both sphinx-build -b doctest and -b html print nothing.

🤖 Generated with Claude Code

customize.rst showed how to add a capitalization_exceptions mask but
not how to drop or replace one. A mask belongs to the word, not a
reading, so remove(word, kind=...) leaves it in place; filtering the
pair out of capitalization_exceptions drops it, and appending a pair
replaces it, the later pair for a key winning. Doctests pin all three,
using the Mac masks #1014 shipped.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@derek73 derek73 added the docs Documentation fixes and updates label Nov 3, 2026
@derek73 derek73 self-assigned this Nov 3, 2026
@derek73 derek73 added this to the 3.0 milestone Nov 3, 2026
@derek73
derek73 merged commit 593d899 into master Nov 3, 2026
13 checks passed
@derek73
derek73 deleted the docs/remove-case-mask branch November 3, 2026 06:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Documentation fixes and updates

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant